﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FinalTestMachine.Connect
{
    public class JiaLiLightModulator_Connect
    {
        public static readonly JiaLiLightModulator_Connect Cur = new JiaLiLightModulator_Connect();

        public JiaLiLightModulator_Connect()
        {
        }

        private SerialPortDemo3.ConnectSerialPortHelper connect => ConnectFactory.SerialPort_LightModulator3;

        public static JiaLiLightModulator_Connect CreatIntance()
        {
            return Cur;
        }

        /// <summary>
        /// 同时将4个通道设为200
        /// </summary>
        public void SwitchIlluminanceTo200()
        {
            connect.Send("$310C86D");
            connect.Send("$320C86E");
            connect.Send("$330C86F");
            connect.Send("$340C868");
        }

        /// <summary>
        /// 同时将4个通道设为0
        /// </summary>
        public void SwitchIlluminanceTo0()
        {
            connect.Send("$3100026");
            connect.Send("$3200025");
            connect.Send("$3300024");
            connect.Send("$3400023");
        }
    }
}